Warning: SimpleXMLElement::asXML(C:\phpstudy_pro\WWW\sitemaps\sitemap_1.xml.tmp): failed to open stream: Permission denied in C:\phpstudy_pro\WWW\dd.php on line 1341
Socket.[captureRejectionSymbol] method | Node.js net module | Bun - AI智能索引
温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/net/Socket/%5BcaptureRejectionSymbol%5D
点击访问原文链接

Socket.[captureRejectionSymbol] method | Node.js net module | Bun

Socket.[captureRejectionSymbol] method | Node.js net module | BunBuildDocsReferenceGuidesBlogDiscord/node:net/Socket/[captureRejectionSymbol]M[events.captureRejectionSymbol]

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:net/Socket/[captureRejectionSymbol]M[events.captureRejectionSymbol]

method

net.Socket.[events.captureRejectionSymbol][events.captureRejectionSymbol](error: Error,event: string | symbol,...args: any[]): void;The Symbol.for('nodejs.rejection') method is called in case a promise rejection happens when emitting an event and captureRejections is enabled on the emitter. It is possible to use events.captureRejectionSymbol in place of Symbol.for('nodejs.rejection').

import { EventEmitter, captureRejectionSymbol } from 'node:events'; class MyClass extends EventEmitter { constructor() { super({ captureRejections: true }); } [captureRejectionSymbol](err, event, ...args) { console.log('rejection happened for', event, 'with', err, ...args); this.destroy(err); } destroy(err) { // Tear the resource down here. } } Referenced typesinterface Errorcause?: unknownThe cause of the error.

message: stringname: stringstack?: string

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录